package oc.tm.sg.admin.memory;

public class MemoryConf {
	
	private String jdbcUrl;
	private String userName;
	private String password;
	
	//初始化连接数量
	private int initialSize=1;
	//配置获取连接等待超时的时间
	private long maxWait=60000;
	//最小空闲连接数
	private int minIdle=1;
	//配置间隔多久才进行一次检测，检测需要关闭的空闲连接，单位是毫秒
	private long timeBetweenEvictionRunsMillis=3000;
	//配置一个连接在池中最小生存的时间，单位是毫秒
	private long minEvictableIdleTimeMillis=300000;
	//开启Druid的监控统计功能  
	private String filters="stat";
	
	public MemoryConf(){
	}

	public MemoryConf(String jdbcUrl, String userName, String password,
			int initialSize, long maxWait, int minIdle,
			long timeBetweenEvictionRunsMillis, long minEvictableIdleTimeMillis, String filters) {
		this.jdbcUrl = jdbcUrl;
		this.userName = userName;
		this.password = password;
		this.initialSize = initialSize;
		this.maxWait = maxWait;
		this.minIdle = minIdle;
		this.timeBetweenEvictionRunsMillis = timeBetweenEvictionRunsMillis;
		this.minEvictableIdleTimeMillis = minEvictableIdleTimeMillis;
		this.filters = filters;
	}

	public String getJdbcUrl() {
		return jdbcUrl;
	}

	public void setJdbcUrl(String jdbcUrl) {
		this.jdbcUrl = jdbcUrl;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public int getInitialSize() {
		return initialSize;
	}

	public void setInitialSize(int initialSize) {
		this.initialSize = initialSize;
	}

	public long getMaxWait() {
		return maxWait;
	}

	public void setMaxWait(long maxWait) {
		this.maxWait = maxWait;
	}

	public int getMinIdle() {
		return minIdle;
	}

	public void setMinIdle(int minIdle) {
		this.minIdle = minIdle;
	}

	public long getTimeBetweenEvictionRunsMillis() {
		return timeBetweenEvictionRunsMillis;
	}

	public void setTimeBetweenEvictionRunsMillis(long timeBetweenEvictionRunsMillis) {
		this.timeBetweenEvictionRunsMillis = timeBetweenEvictionRunsMillis;
	}

	public long getMinEvictableIdleTimeMillis() {
		return minEvictableIdleTimeMillis;
	}

	public void setMinEvictableIdleTimeMillis(long minEvictableIdleTimeMillis) {
		this.minEvictableIdleTimeMillis = minEvictableIdleTimeMillis;
	}

	public String getFilters() {
		return filters;
	}

	public void setFilters(String filters) {
		this.filters = filters;
	}

}
